<?php
$pacote = "classes/componentes";
$pathToThis = pathinfo(__FILE__);
$root = substr($pathToThis['dirname'], 0, strlen($pathToThis['dirname']) - strlen($pacote) - 1);

require_once $root."/classes/base/Componente.class.php";

class InputSubmit extends Componente {
	public function InputSubmit($label = "Envia", $classStyle = "InputSubmit") {
    	$this->setLabel($label);
    	$this->setClassStyle($classStyle);
    }
    
    public function render($nome, $form) {
    	$ret = '<input type="submit" value="'.$this->getLabel().'" ';
    	$ret .= 'name="'.$nome.'" id="'.$nome.'" ';
    	$ret .= 'class="'.$this->getClassStyle().'" ';
		if (!$this->getHabilitado())
    		$ret .= 'disabled ';
    	$ret .= '/>';
    	return $ret;
    }
}
?>